package com.txx.design.principles.dependencyinversion;

public class Me {

    private Study study;

    //通过set方法注入具体实现类 而不再方法中依赖
    public void setStudy(Study study) {
        this.study = study;
    }

    public void study(){
        study.studyByCode();
    }

}
